/**
 *
 */
package org.blueoxygen.rest.geneology;

import java.sql.Blob;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.blueoxygen.cimande.DefaultPersistence;

/**
 * @author vick
 * 
 */

@Entity
@Table
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Person extends DefaultPersistence {

	private String firstName;
	private String lastName;
	private boolean male;
	private String birthDate;

	private RelationshipStatus status = RelationshipStatus.SINGLE;
	private Person relation;
	private Person father;
	private Person mother;
	// private List<Person> child = new ArrayList<Person>();

	private String address;
	private String city;
	private String state;
	private String country;

	private String mobile;
	private String email;

	private Blob photo;
	private String contentType;

	@Column(name = "first_name")
	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "last_name")
	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column
	public boolean isMale() {
		return male;
	}

	public void setMale(boolean male) {
		this.male = male;
	}

	@Column
	public String getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(String birthDate) {
		this.birthDate = birthDate;
	}

	@Column
	public RelationshipStatus getStatus() {
		return status;
	}

	public void setStatus(RelationshipStatus status) {
		this.status = status;
	}

	@OneToOne
	public Person getRelation() {
		return relation;
	}

	public void setRelation(Person relation) {
		this.relation = relation;
	}

	@ManyToOne
	public Person getFather() {
		return father;
	}

	public void setFather(Person father) {
		this.father = father;
	}

	@ManyToOne
	public Person getMother() {
		return mother;
	}

	public void setMother(Person mother) {
		this.mother = mother;
	}

	@Column
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	@Column
	public Blob getPhoto() {
		return photo;
	}

	public void setPhoto(Blob photo) {
		this.photo = photo;
	}
	@Column
	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

}
